package cn.wolfcode.wolf2w.business.api;

import cn.wolfcode.wolf2w.common.core.constant.SecurityConstants;
import cn.wolfcode.wolf2w.common.core.domain.R;
import cn.wolfcode.wolf2w.business.api.domain.Questionse;
import cn.wolfcode.wolf2w.business.api.domain.Questionse;
import cn.wolfcode.wolf2w.business.business.api.factory.RemoteQuestionseFallbackFactory;
import cn.wolfcode.wolf2w.common.core.constant.Constants;
import cn.wolfcode.wolf2w.common.core.constant.SecurityConstants;
import cn.wolfcode.wolf2w.common.core.constant.ServiceNameConstants;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestHeader;

import java.util.List;

/**
* 问答 远程服务
 *
 *
 * @author SQM
 * @date 2024-11-18
 */
@FeignClient(contextId = "RemoteQuestionseService", name = "travel-questionse", fallbackFactory = RemoteQuestionseFallbackFactory.class)
public interface RemoteQuestionseService {

    @GetMapping("/questionses/feign/list")
    R<List<Questionse>> list(@RequestHeader(SecurityConstants.FROM_SOURCE) String source);

    @GetMapping("/questionses/feign/{id}")
    R<Questionse> getOne(@PathVariable("id") Long id, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);

}
